Browse code

usrloc: use unsigned int for rpc output for the fields having this type

Daniel-Constantin Mierla authored on 21/09/2020 08:59:34
Showing 1 changed files
... ...
@@ -144,12 +144,12 @@ int rpc_dump_contact(rpc_t* rpc, void* ctx, void *ih, ucontact_t* c)
144 144
 		rpc->fault(ctx, 500, "Internal error adding state");
145 145
 		return -1;
146 146
 	}
147
-	if(rpc->struct_add(vh, "d", "Flags", c->flags)<0)
147
+	if(rpc->struct_add(vh, "u", "Flags", c->flags)<0)
148 148
 	{
149 149
 		rpc->fault(ctx, 500, "Internal error adding flags");
150 150
 		return -1;
151 151
 	}
152
-	if(rpc->struct_add(vh, "d", "CFlags", c->cflags)<0)
152
+	if(rpc->struct_add(vh, "u", "CFlags", c->cflags)<0)
153 153
 	{
154 154
 		rpc->fault(ctx, 500, "Internal error adding cflags");
155 155
 		return -1;
... ...
@@ -159,7 +159,7 @@ int rpc_dump_contact(rpc_t* rpc, void* ctx, void *ih, ucontact_t* c)
159 159
 		rpc->fault(ctx, 500, "Internal error adding socket");
160 160
 		return -1;
161 161
 	}
162
-	if(rpc->struct_add(vh, "d", "Methods", c->methods)<0)
162
+	if(rpc->struct_add(vh, "u", "Methods", c->methods)<0)
163 163
 	{
164 164
 		rpc->fault(ctx, 500, "Internal error adding methods");
165 165
 		return -1;
... ...
@@ -175,7 +175,7 @@ int rpc_dump_contact(rpc_t* rpc, void* ctx, void *ih, ucontact_t* c)
175 175
 		rpc->fault(ctx, 500, "Internal error adding instance");
176 176
 		return -1;
177 177
 	}
178
-	if(rpc->struct_add(vh, "d", "Reg-Id", c->reg_id)<0)
178
+	if(rpc->struct_add(vh, "u", "Reg-Id", c->reg_id)<0)
179 179
 	{
180 180
 		rpc->fault(ctx, 500, "Internal error adding reg_id");
181 181
 		return -1;
... ...
@@ -286,7 +286,7 @@ static void ul_rpc_dump(rpc_t* rpc, void* ctx)
286 286
 						rpc->fault(ctx, 500, "Internal error creating aor struct");
287 287
 						return;
288 288
 					}
289
-					if(rpc->struct_add(bh, "Sd[",
289
+					if(rpc->struct_add(bh, "Su[",
290 290
 								"AoR", &r->aor,
291 291
 								"HashID", r->aorhash,
292 292
 								"Contacts", &ih)<0)