Lost Password?

Go Back   CodeCall Programming Forum > Software Development > C and C++

Vote on your favorite hash algorithm here!

C and C++ C and C++ forum for discussing all forms of C except for C#. These languages are powerful low level languages used for creating Operating Systems, Device Drivers, compilers and much more.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-28-2007, 11:24 AM
Alhazred Alhazred is offline
Newbie
 
Join Date: Jul 2007
Posts: 23
Credits: 6
Rep Power: 5
Alhazred is on a distinguished road
Default [C] Comparison problem

My client-server software should simulate an email service on a local machine.
Send, receive, delete functions works properly, now I have to implement the login service.
- Once the server is started, the function "InizializzaUtenti" create a list of users loaded from a text file "utenti.txt", then waits the client.
- The client, with the function "LogIn", sends a message to the server that contains username, password and a service code to request the login service (4)
- The server receive correctly the message and starts the function "LogIn" thet manage that service.

Problem
- Inside the server function "LogIn" the comparison between user and pass received from the client and those loaded from the text file do not work properly.

I think there should be a problem with line feed at the end of strings, but I can't solve the question. Is that the matter? Can you help me with the problem?

This is the essential code to menage the login service, I deleted everything else since it works and could confuse reading the code:
- http://lacasa.altervista.org/software/Server.c
- http://lacasa.altervista.org/software/Client.c
- http://lacasa.altervista.org/software/utenti.txt

txt file must be inside the folder where server process starts.
txt file structure is:
- line 1 -> username1
- line 2 -> password1
- line 3 -> username2
- line 4 -> password2
... and so on

To see the code you have to copy the url and paste inside the browsers address bar.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 08-29-2007, 04:58 AM
Alhazred Alhazred is offline
Newbie
 
Join Date: Jul 2007
Posts: 23
Credits: 6
Rep Power: 5
Alhazred is on a distinguished road
Default

Problem found... as I thought it was a problem with CR and LF.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Peculiar UI Problem Needs Tackling adriyel C# Programming 2 04-06-2008 07:46 AM
i have a problem please help me!!!???? stack Java Help 8 09-22-2007 03:17 PM
A small problem in the output The_Master C and C++ 3 12-13-2006 12:04 PM


All times are GMT -5. The time now is 06:36 PM.

Contest Stats

Xav ........ 1359.44
MeTh0Dz|Reb0rn ........ 1072.63
WingedPanther ........ 911.18
marwex89 ........ 906.86
morefood2001 ........ 899.18
John ........ 887.37
Brandon W ........ 770.65
chili5 ........ 312.39
Steve.L ........ 264.99
dcs ........ 232.34

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 83%

Ads