16,022,846 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Visual Basic questions
View Javascript questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Member 12018498 (Top 18 by date)
Member 12018498
18-Mar-16 1:03am
View
thank you Richard for a suggestion. so if I cant do that, we have to move only files, delete the existing smybolic links and recreate a new link. I will try it
Member 12018498
21-Jan-16 6:20am
View
Thank you for suggestion. and sorry, i didn't get you. I am new to regex or grep usage, Do you mean use this regex for grepping?. I did like this /abc/tej --version | grep "(?<=Version = .*?()\d+.\d+(?=.\d+-\d+))". but I didn't get any output
Member 12018498
4-Dec-15 4:13am
View
Thank you so much. I understood the difference now.
Member 12018498
4-Dec-15 4:00am
View
Thank you . I am using macro for logging the comments of my code. I wanted the same marco to be used for logging with overloading property. Like ENTER() and ENTER(thread id). with argument and without argument.So is it possible to do. I cannot avoid usage of macro. Because it was existing from long back in my project.
Member 12018498
27-Nov-15 4:33am
View
Sorry.. I mean Sergey Alexandrovich --SA
Member 12018498
27-Nov-15 0:25am
View
Thank you so much Alex. really its 5++ answer :)
Member 12018498
24-Nov-15 7:37am
View
Thanks for the suggestion. I will add more debugs and check the reason. Unfortunately,I can't add the code in try block here, as it has methods which are part of other files. and bit huge :(
Member 12018498
2-Nov-15 4:36am
View
Thank you Jochen for the suggestion. I went through the source code of snmp_api.
I found out when will we get SNMPERR_SUCCESS.
Below is the part of code
....................................................
if (slp->session->securityEngineIDLen == 0) {
DEBUGMSGTL(("snmp_api","unable to determine remote engine ID\n"));
snmp_sess_close(slp);
return NULL;
}
in_session->s_snmp_errno = SNMPERR_SUCCESS;
....................................................
As I am new, I dont know much about what is engineId . So trying to figure out.
Thanks again. Have a good day
Member 12018498
30-Oct-15 9:32am
View
NET-SNMP version: 5.4.2.1 on Unix platform.
Member 12018498
30-Oct-15 9:06am
View
I am really thankful for your time Jochen. Thank you so much.
went through the link suggested by you. and i see the below line
"For errors returned by snmp_sess_open(), use the corresponding function snmp_error() instead of snmp_sess_error(). " So I think that it should not be the problem.
Member 12018498
30-Oct-15 8:45am
View
The error code I got was SNMPERR_SUCCESS. I accessed the error code and the result I got is (0,0). which means everything is fine. go ahead. But if its returned null, there must be some problem rite?
part of code---
............................................................
struct snmp_session session;( snmp_session present in snmp_api.h.)
openSession = NetSnmp::getInstance().snmp_sess_open(&session);
if (NULL == openSession) {
int liberr=0, syserr=0;
char *errstr=NULL;
NetSnmp::getInstance().snmp_error(&session, &liberr, &syserr, &errstr);
std::string error(errstr);
::free(errstr);
cout<<"Failed to open snmp session to %s, error: %s (%d,%d)", port,errstr, liberr, syserr";
close();
}
And the output is: "Failed to open snmp session to 127.0.0.1:xxxx, error: (0,0)"
.............................................................
hence I was confused, that error code says everything is fine, but still null is returned .
Member 12018498
30-Oct-15 8:03am
View
Ok no problem :) . Thanks again for helping to understand.
Member 12018498
30-Oct-15 7:58am
View
Thank you Jochen.Does that mean there is some other problem with null value returned from snmp_open?. Please see the above comment
Member 12018498
30-Oct-15 7:55am
View
Thank you Andy..But the snmp session was not started .
From the below description... snmp_open will return null if some error occurs.
/*
* netsnmp_session *snmp_open(session)
* netsnmp_session *session;
*
* Sets up the session with the snmp_session information provided
* by the user. Then opens and binds the necessary UDP port.
* A handle to the created session is returned (this is different than
* the pointer passed to snmp_open()). On any error, NULL is returned
* and snmp_errno is set to the appropriate error code.
*/
netsnmp_session *snmp_open(netsnmp_session *);
............................................................
So i wrote a check if its null throw the error. Its quite clear that it was null.
Can you please suggest something
Member 12018498
15-Oct-15 1:42am
View
Thank you so much for suggesting. I will improvise my code. And ppolymorphe suggestion solved my problem :)
Member 12018498
15-Oct-15 1:38am
View
Thank you for suggestion. Yes I know that j is always below 3, because the string 'log' which reads the file has only 2 time occurrence of substing "stopping component". You are right.I found out the mistake. I changed i < Log.length() to i < coulmns.lenght. Its working now.
Member 12018498
8-Oct-15 2:52am
View
Thank you. I used split and then done with help of loop.
Member 12018498
7-Oct-15 1:03am
View
Thank you for suggestion. I tried it using newBufferedReader(Path, Charset) and printing the data in column wise. But my question is how can I print the data in certain column based on a condition.I want to give one condition " Trying to stop 'Comp'" and get the data in second column
Show More