out->number_of_parameter = 0;
out->array_of_parameter = NULL;
- ret = hashtable_get ( plugin_cmd_hashtable, cmd, &pr );
- if ( ret == 1 ) {
- // supported by plugin
- ret = plugin_sync_proc ( cmd, in, out );
- if ( ret == PLUGIN_CMD_NOT_SUPPORT ) {
- // not supported by plugin
- ret = default_plugin_sync_proc ( cmd, in, out );
- }
+ if ( plugin_cmd_hashtable ) {
+ ret = hashtable_get ( plugin_cmd_hashtable, cmd, &pr );
+ if ( ret == 1 ) {
+ // supported by plugin
+ ret = plugin_sync_proc ( cmd, in, out );
+ if ( ret == PLUGIN_CMD_NOT_SUPPORT ) {
+ // not supported by plugin
+ ret = default_plugin_sync_proc ( cmd, in, out );
+ }
+ } else {
+ // not supported by plugin
+ ret = default_plugin_sync_proc ( cmd, in, out );
+ }
} else {
- // not supported by plugin
- ret = default_plugin_sync_proc ( cmd, in, out );
+ ret = default_plugin_sync_proc ( cmd, in, out );
}
return ret;
{
int ret, pr;
- ret = hashtable_get ( plugin_cmd_hashtable, cmd, &pr );
- if ( ret == 1 ) {
- // supported by plugin
- ret = plugin_async_proc ( cmd, in, out_fd );
- if ( ret == PLUGIN_CMD_NOT_SUPPORT ) {
- // not supported by plugin
- ret = default_plugin_async_proc ( cmd, in, out_fd );
- }
+ if ( plugin_cmd_hashtable ) {
+ ret = hashtable_get ( plugin_cmd_hashtable, cmd, &pr );
+ if ( ret == 1 ) {
+ // supported by plugin
+ ret = plugin_async_proc ( cmd, in, out_fd );
+ if ( ret == PLUGIN_CMD_NOT_SUPPORT ) {
+ // not supported by plugin
+ ret = default_plugin_async_proc ( cmd, in, out_fd );
+ }
+ } else {
+ // not supported by plugin
+ ret = default_plugin_async_proc ( cmd, in, out_fd );
+ }
} else {
- // not supported by plugin
- ret = default_plugin_async_proc ( cmd, in, out_fd );
+ ret = default_plugin_async_proc ( cmd, in, out_fd );
}
release_parameters(in);