Explorar o código

ctl: one more revert in handlig rpc struct in response

Daniel-Constantin Mierla %!s(int64=8) %!d(string=hai) anos
pai
achega
cc40fb7cbc
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      src/modules/ctl/binrpc_run.c

+ 2 - 1
src/modules/ctl/binrpc_run.c

@@ -1099,7 +1099,7 @@ static int rpc_struct_add(struct rpc_struct_l* s, char* fmt, ...)
 				}
 				clist_append(&s->substructs, rs, next, prev);
 				*(va_arg(ap, void**))=rs;
-				break;
+				goto end;
 			case 'f':
 				avp.type=BINRPC_T_DOUBLE;
 				avp.u.fval=va_arg(ap, double);
@@ -1114,6 +1114,7 @@ static int rpc_struct_add(struct rpc_struct_l* s, char* fmt, ...)
 			goto error;
 		}
 	}
+end:
 	va_end(ap);
 	return 0;
 error_mem: