if(!d) return -1; \
if(!d->session) { osrfLogError( OSRF_LOG_MARK, "Session is NULL in app reqeust" ); return -1; }\
if(!d->method) { osrfLogError( OSRF_LOG_MARK, "Method is NULL in app reqeust" ); return -1; }\
- if(!d->params) { osrfLogError( OSRF_LOG_MARK, "Params is NULL in app reqeust %s", d->method->name ); return -1; }\
- if( d->params->type != JSON_ARRAY ) { \
- osrfLogError( OSRF_LOG_MARK, "'params' is not a JSON array for method %s", d->method->name);\
- return -1; }\
+ if(d->method->argc) {\
+ if(!d->params) { osrfLogError( OSRF_LOG_MARK, "Params is NULL in app reqeust %s", d->method->name ); return -1; }\
+ if( d->params->type != JSON_ARRAY ) { \
+ osrfLogError( OSRF_LOG_MARK, "'params' is not a JSON array for method %s", d->method->name);\
+ return -1; }\
+ }\
if( !d->method->name ) { osrfLogError( OSRF_LOG_MARK, "Method name is NULL"); return -1; }
#ifdef OSRF_LOG_PARAMS