Kaynağa Gözat

ctl: one more revert in handlig rpc struct in response

Daniel-Constantin Mierla 8 yıl önce
ebeveyn
işleme
cc40fb7cbc
1 değiştirilmiş dosya ile 2 ekleme ve 1 silme
  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: