indata != ""
You can't compare strings in this way! You must use something like strcmp(indata,"")
Mark