Exemplo n.º 1
0
static int cmd_dump_stop(int fd, int argc, argv_type argv) {
  int in, out;

  if(argc == 3) {
    in = 1;
    out = 1;
  } else if(argc == 4) {
    if(0 == strcasecmp(argv[3], "in")) {
      in = 1;
      out = 0;
    } else if(0 == strcasecmp(argv[3], "out")) {
      in = 0;
      out = 1;
    } else if(0 == strcasecmp(argv[3], "both")) {
      in = 1;
      out = 1;
    } else {
      return RESULT_SHOWUSAGE;
    }
  } else {
    return RESULT_SHOWUSAGE;
  }
  cleanup_dump(fd, in, out);
  return RESULT_SUCCESS;
}
Exemplo n.º 2
0
static int ss7_unload_module(void)
{
  cli_unregister();

#ifdef SCCP
  sccp_cleanup();
#endif
  isup_cleanup();

  cleanup_dump(0, 1, 1);
  if(monitor_running) {
    stop_monitor();
  }
  stop_mtp_thread();
  mtp_cleanup();
  timers_cleanup();


  destroy_config();
  ast_verbose(VERBOSE_PREFIX_3 "SS7 channel unloaded.\n");
  return AST_MODULE_LOAD_SUCCESS;
}
Exemplo n.º 3
0
JNIEXPORT void JNICALL
Java_com_sun_netstorage_samqfs_mgmt_fs_Restore_cleanDump(JNIEnv *env,
    jclass cls /*ARGSUSED*/, jobject ctx, jstring fsname, jstring dumppath) {

	jboolean isCopy, isCopy2;
	char *fstr = GET_STR(fsname, isCopy);
	char *dstr = GET_STR(dumppath, isCopy2);

	PTRACE(1, "jni:Restore_cleanDump(...,%s, %s) entry",
	    Str(fstr), Str(dstr));
	if (-1 == cleanup_dump(CTX, fstr, dstr)) {
		REL_STR(fsname, fstr, isCopy);
		REL_STR(dumppath, dstr, isCopy2);
		ThrowEx(env);
		return;
	}

	REL_STR(fsname, fstr, isCopy);
	REL_STR(dumppath, dstr, isCopy2);

	PTRACE(1, "jni:Restore_cleanDump() done");
}
Exemplo n.º 4
0
samrpc_result_t *
samrpc_cleanup_dump_4_svr(
	string_string_arg_t *arg,
	struct svc_req *req	/* ARGSUSED */
)
{
	int ret = -1;

	Trace(TR_DEBUG, "Cleanup dump[%s]", arg->str1);

	/* free previous result */
	xdr_free(xdr_samrpc_result_t, (char *)&rpc_result);

	SAMRPC_CHECK_TIMESTAMP(arg->ctx->handle->timestamp);

	Trace(TR_DEBUG, "Calling native library to cleanup dump");
	ret = cleanup_dump(arg->ctx, arg->str1, arg->str2);

	SAMRPC_SET_RESULT(ret, SAM_VOID, 0);

	Trace(TR_DEBUG, "cleanup dump return [%d]", ret);

	return (&rpc_result);
}