فهرست منبع

call_obj: b/f acept optional limit parameter.

Vicente Hernando 6 سال پیش
والد
کامیت
8266f0ee05
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      src/modules/call_obj/call_obj_mod.c

+ 1 - 1
src/modules/call_obj/call_obj_mod.c

@@ -106,7 +106,7 @@ static void rpc_call_obj_list(rpc_t *rpc, void *ctx)
 	cobj_elem_t *list = NULL;
 
 	int rc = rpc->scan(ctx, "d*d", &duration, &limit);
-	if (rc != -1 && rc != 2) {
+	if (rc != 1 && rc != 2) {
 		rpc->fault(ctx, 400, "requires arguments for duration number (and optionally limit)");
 		goto clean;
 	}