Skip to content

Commit c3ddb96

Browse files
author
fengzero
committed
errorcode: app not running
1 parent f69c074 commit c3ddb96

5 files changed

Lines changed: 9 additions & 6 deletions

File tree

‎include/neuron/errcodes.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,8 @@ typedef enum {
158158
NEU_ERR_PLUGIN_NOT_SUPPORT_FDOWN_DATA = 3028,
159159
NEU_ERR_PLUGIN_NOT_SUPPORT_IMPORT_TAGS = 3029,
160160

161+
NEU_ERR_PLUGIN_APP_NOT_RUNNING = 3030,
162+
161163
NEU_ERR_MQTT_FAILURE = 4000,
162164
NEU_ERR_MQTT_NO_CERTFILESET = 4001,
163165
NEU_ERR_MQTT_CERTFILE_LOAD_FAILURE = 4002,

‎plugins/datalayers/datalayers_handle.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ int handle_trans_data(neu_plugin_t * plugin,
391391

392392
if (plugin->common.link_state != NEU_NODE_LINK_STATE_CONNECTED) {
393393
pthread_rwlock_unlock(&plugin->plugin_mutex);
394-
return NEU_ERR_PLUGIN_NOT_RUNNING;
394+
return NEU_ERR_PLUGIN_APP_NOT_RUNNING;
395395
}
396396

397397
const route_entry_t *route = route_tbl_get(

‎plugins/kafka/kafka_handle.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ int handle_trans_data(neu_plugin_t *plugin, neu_reqresp_trans_data_t *data)
142142
int rv = 0;
143143

144144
if (NULL == plugin->rk) {
145-
return NEU_ERR_PLUGIN_NOT_RUNNING;
145+
return NEU_ERR_PLUGIN_APP_NOT_RUNNING;
146146
}
147147

148148
const kafka_route_entry_t *route =
@@ -176,7 +176,7 @@ int handle_trans_data(neu_plugin_t *plugin, neu_reqresp_trans_data_t *data)
176176
}
177177

178178
free(json_str);
179-
return rv == 0 ? NEU_ERR_SUCCESS : NEU_ERR_PLUGIN_NOT_RUNNING;
179+
return rv == 0 ? NEU_ERR_SUCCESS : NEU_ERR_PLUGIN_APP_NOT_RUNNING;
180180
}
181181

182182
int handle_subscribe_group(neu_plugin_t *plugin, neu_req_subscribe_t *sub)

‎plugins/kafka/kafka_plugin_intf.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ static int kafka_plugin_config(neu_plugin_t *plugin, const char *setting)
350350
if (NULL == plugin->rk) {
351351
plog_error(plugin, "create kafka producer fail");
352352
kafka_config_fini(&config);
353-
return NEU_ERR_PLUGIN_NOT_RUNNING;
353+
return NEU_ERR_PLUGIN_APP_NOT_RUNNING;
354354
}
355355

356356
if (0 != start_poll_timer(plugin)) {
@@ -375,7 +375,7 @@ static int kafka_plugin_start(neu_plugin_t *plugin)
375375
{
376376
if (NULL == plugin->rk) {
377377
plog_error(plugin, "kafka producer is NULL");
378-
return NEU_ERR_PLUGIN_NOT_RUNNING;
378+
return NEU_ERR_PLUGIN_APP_NOT_RUNNING;
379379
}
380380

381381
if (0 != start_poll_timer(plugin)) {
@@ -445,7 +445,7 @@ static int kafka_plugin_request(neu_plugin_t *plugin, neu_reqresp_head_t *head,
445445
break;
446446
}
447447
default:
448-
error = NEU_ERR_PLUGIN_NOT_RUNNING;
448+
error = NEU_ERR_PLUGIN_APP_NOT_RUNNING;
449449
break;
450450
}
451451

‎src/utils/http.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ int neu_http_response(nng_aio *aio, neu_err_code_e code, char *content)
270270
case NEU_ERR_GROUP_ALREADY_SUBSCRIBED:
271271
case NEU_ERR_PLUGIN_PROTOCOL_DECODE_FAILURE:
272272
case NEU_ERR_PLUGIN_NOT_RUNNING:
273+
case NEU_ERR_PLUGIN_APP_NOT_RUNNING:
273274
case NEU_ERR_PLUGIN_TAG_NOT_READY:
274275
case NEU_ERR_PLUGIN_PACKET_OUT_OF_ORDER:
275276
case NEU_ERR_MQTT_FAILURE:

0 commit comments

Comments
 (0)