News:

We really need your input in this questionnaire

Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - szll2010

#1
General / SetPassword in Trunk Code
February 26, 2011, 11:27:07 AM
Dear Victor,

There is a bug in the userdb_objects.cpp in trunk. The setpassword function does not consider the Unicode and MBCS. However, I changed the code to this:
void User::setPassword(const TCHAR *password, bool clearChangePasswdFlag)
{
#ifdef UNICODE
   char *mb = MBStringFromWideString(password);
   CalculateSHA1Hash((BYTE *)mb, strlen(mb), m_passwordHash);
   free(mb);
#else
   CalculateSHA1Hash((BYTE *)password, _tcslen(password), m_passwordHash);
#endif
   //CalculateSHA1Hash((BYTE *)password, _tcslen(password), m_passwordHash);
   m_graceLogins = MAX_GRACE_LOGINS;
   m_flags |= UF_MODIFIED;
   if (clearChangePasswdFlag)
      m_flags &= ~UF_CHANGE_PASSWORD;
}
Still has the problem with setting or changing the password.

Could you check?

best regards,

szll2010
#2
General / Re: Server Module development
January 24, 2011, 05:55:22 PM
I've got it.

Thanks very much.

Best regards,

Szll2010
#3
General / Re: Server Module development
January 22, 2011, 09:04:09 AM
Hi Victor,

The thread process code of server module need to delete the message object, but in main thread  the message object will be deleted too. So could you consider a solution:
1 copy the the message pointer(msg) to another pointer
2 set the pointer (msg) to NULL
3 main thread delete msg(NULL)
4 server module is responsible to delete the msg (delete data->msg) in the pfHandler

Best regards,
#4
General / Re: Server Module development
January 20, 2011, 11:06:12 AM
Hi Victor,

The DBAsyncSelect is no problem without using the StartCommandHandler to start new thread to process the command. It's very strange. The code is very simple, just a dbgprintf() and use your skeleton of module, crash with thread and ok with normal process.

BTW, the server code is the trunk's snapshot.

Best regards,   
#5
General / Re: Server Module development
January 19, 2011, 05:34:37 PM
Hi Victor

Can I use DBAsyncSelect function in module?  I use it in my server module, it makes server crash.

Pls advise.

Thanks.
#6
General / Re: Server Module development
January 19, 2011, 03:55:31 PM
Hi Victor,

Another question, how to use the db function in the module? I mean there are globals, like g_nDBSyntax and
g_hCoreDB . I want to add an audit log module the system using the module?

BTW, the new feature is not previewed in windows console, is the windows console deprecated?



#7
Hi Victor,

I do send this port to the community.  For the reason of windows port, I erased some unix codes in the source and I trim the nxagentd.cpp to a simpler version. Two subagents were ported , WINNT and WINPERF.

How to send the files to you?

best regards,
#8
Hi Victor,

Sorry for mistake in the Config::print test using the setvbuf function to output. It should be OK.

Best regards,

#9
Hi Victor,

I tested the new config API again but it does not work well with east asian characters.

The program is Unicode version, and the config's coding is UTF-8 and ANSI, in the config file there is some east asian characters. In  both scenarios,    the east asian characters became ?? under Config::print , the others are right.

Thanks



 
#10
Hi Victor,

Thanks for your port. Now the file system function works well.  I port the all the core agent and WINNT and winperf subagent to WINDOWS  UNICODE except the hddinfo has a bug.  Not really understand the  StrStrip function.

I also test the new config relative function, it can read ANSI and UNICODE content in the config file, but using the config->print function, it has problem with MBCS, like east asian characters. Could you check?
#11
Hi Victor,

Almost port the nxagentd to UNICODE for windows based the trunk version. Whether it is possible to port the dir relative structure members to TCHAR and dir.c to support TCHAR?

#12
Hi Victor

Thanks. I noticed that some header files had been modified and I will try after the 1.1.0 is released.

And I want to know how to deal with the IP address changing problem. For example, some devices are  in remote site and connected through carrier network. The node's IP address is not the same as last time connected. Does the agent register and server recognizes the agent then change the node's ip address, or there is other solution? 
#13
Hi Victor,

I try to manage some WIN CE devices. Not sure that MBCS is no problem. Could you advise?
#14
General / Re: Server Module development
December 20, 2010, 05:47:19 AM
Hi Victor,

How to construct the method in the server module to process the Agent's originated CMD(if custom define)? I read the source code and not found in the AgentConnection Class. Has it been put in the m_pMsgWaitQueue for processing by Session, for example CMD_GET_MY CONFIG.
#15
Hi Victor,

Thanks for your quick action.

Is there any chance to port Agent to Unicode?